package com.jlf.core.error.exception;

import lombok.Getter;

/**
 * 基础的服务异常类
 *
 * @author wujr
 * 2021/8/18
 * @version 1.0
 * 变更历史
 * [wujr 2021/8/18 1.0 新增]
 */
@Getter
public class BasicServerException extends Exception{
    /**
     * 哪个领域的服务异常
     * 领域类名称
     */
    private final Class<?> domainClass;
    /**
     * 领域的中文名称
     */
    private final String domainName;

    public BasicServerException(Class<?> domainClass, String domainName, String msg){
        super(msg);
        this.domainClass = domainClass;
        this.domainName = domainName;
    }
    public BasicServerException(Class<?> domainClass, String domainName, Throwable e){
        super(e);
        this.domainClass = domainClass;
        this.domainName = domainName;
    }
}
